//
//  HRFollowListViewModel.m
//  Hear
//
//  Created by mac on 2017/4/22.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HRFollowListViewModel.h"
#import "HRFollowListModel.h"
@implementation HRFollowListViewModel
-(void)getUserFollowList:(HRfollowListRequestModel *)requstModel andUrl:(NSString *)url andResultArr:(void(^)(NSArray *resultArr))resultArr{
    YTKApi *api = [YTKApi apiGetWithUrl:url parameter:requstModel];
    [api getSuccessToken:^() {
        api.foceNoTocken = NO;
        [api setRequestSerializerType:YTKRequestSerializerTypeJSON];
        [api startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
            
            NSDictionary *dict = request.responseJSONObject;
            
            
            
            
            resultArr([NSArray modelArrayWithClass:[HRFollowListModel class] json:dict[@"BodyContent"]]);

        } failure:^(__kindof YTKBaseRequest * _Nonnull request) {
            resultArr(@[]);
        }];
    }];
}
@end
